<template>
	<view class="bigBoxSty">
		<div class="h-100"></div>
		<view @click="goInfoPage">
			<image :src="getImageUrl('/shopstatic/icon/setIcon.png')" mode="" class="w-40 h-40 mr-24" style="float: right;" ></image>
		</view>
	
		<!-- 用户信息 -->
		 <view class="between ml-16 ml-24 mr-24 mt-40">
			 <view v-if="userInfo" class="flex-start flex-1" @click="goPage('', 4)">
			 	<image :src="userInfo.avatar ? getImageUrl(userInfo.avatar) : '/static/default.png'" mode="aspectFill" class="w-110 h-110" style="border-radius:500rpx"></image>
				<view class="ml-20 flex-1">
					<!-- {{get(userInfo, "user.username")}} -->
					<p class="fz32 font-bold text-111 mt-10" >{{userInfo[plang('username')]}} <text style="color: #606366;font-size: 20rpx;font-weight: 500;margin-left: 10rpx;">ID:{{ usersId }}</text></p>
					
					<view class="flex-start  mt-16">
						<!-- <image class="w-30 h-20 vam" :src="createNational(userInfo.country).imgurl" mode="aspectFill" >
						</image> -->

						<template v-if="userInfo.identity_type != 11">
							<template v-if="userInfo.identity_type != 8">
								<view class="CertifiedSty" v-if="userInfo&&userInfo.is_audit==3">
									<!-- <image src="../../../static/icon/certifiedFlag.png" mode="widthFix" class="w-45 h-45"></image> -->
									<image 	:src="getImageUrl('/shopstatic/icon/certifiedFlag.png')" mode="widthFix" class="w-45 h-45"></image>
									<p class="fz22 font-bold text-white">{{ $t('认证失败') }}</p>
								</view>
								<view class="CertifiedSty" v-if="userInfo&&userInfo.is_audit==2">
									<!-- <image src="../../../static/icon/certifiedFlag.png" mode="widthFix" class="w-45 h-45"></image> -->
									<image 	:src="getImageUrl('/shopstatic/icon/certifiedFlag.png')" mode="widthFix" class="w-45 h-45"></image>
									<p class="fz22 font-bold text-white">{{ $t('已认证') }}</p>
								</view>
								<view class="CertifiedSty" v-if="userInfo&&userInfo.is_audit==1">
									<!-- <image src="../../../static/icon/certifiedFlag.png" mode="widthFix" class="w-45 h-45"></image> -->
									<image 	:src="getImageUrl('/shopstatic/icon/certifiedFlag.png')" mode="widthFix" class="w-45 h-45"></image>
									<p class="fz22 font-bold text-white">{{ $t('审核中') }}</p>
								</view>
								<view class="CertifiedSty" v-if="userInfo&&userInfo.is_audit==0">
									<!-- <image src="../../../static/icon/certifiedFlag.png" mode="widthFix" class="w-45 h-45"></image> -->
									<image 	:src="getImageUrl('/shopstatic/icon/certifiedFlag.png')" mode="widthFix" class="w-45 h-45"></image>
									<p class="fz22 font-bold text-white">{{ $t('未认证') }}</p>
								</view>
							</template>
							<template v-else>
								<view class="CertifiedSty">
									<!-- <image src="../../../static/icon/certifiedFlag.png" mode="widthFix" class="w-45 h-45"></image> -->
									<image 	:src="getImageUrl('/shopstatic/icon/certifiedFlag.png')" mode="widthFix" class="w-45 h-45"></image>
									<p class="fz22 font-bold text-white">{{ $t('已认证') }}</p>
								</view>
							</template>

						</template>
						<template v-else>
							<view class="CertifiedSty" v-if="userInfo&&userInfo.user_staff.is_renzheng==3">
								<!-- <image src="../../../static/icon/certifiedFlag.png" mode="widthFix" class="w-45 h-45"></image> -->
								<image 	:src="getImageUrl('/shopstatic/icon/certifiedFlag.png')" mode="widthFix" class="w-45 h-45"></image>
								<p class="fz22 font-bold text-white">{{ $t('认证失败') }}</p>
							</view>
							<view class="CertifiedSty" v-if="userInfo&&userInfo.user_staff.is_renzheng==2">
								<!-- <image src="../../../static/icon/certifiedFlag.png" mode="widthFix" class="w-45 h-45"></image> -->
								<image 	:src="getImageUrl('/shopstatic/icon/certifiedFlag.png')" mode="widthFix" class="w-45 h-45"></image>
								<p class="fz22 font-bold text-white">{{ $t('已认证') }}</p>
							</view>
							<view class="CertifiedSty" v-if="userInfo&&userInfo.user_staff.is_renzheng==1">
								<!-- <image src="../../../static/icon/certifiedFlag.png" mode="widthFix" class="w-45 h-45"></image> -->
								<image 	:src="getImageUrl('/shopstatic/icon/certifiedFlag.png')" mode="widthFix" class="w-45 h-45"></image>
								<p class="fz22 font-bold text-white">{{ $t('审核中') }}</p>
							</view>
							<view class="CertifiedSty" v-if="userInfo&&userInfo.user_staff.is_renzheng==0">
								<!-- <image src="../../../static/icon/certifiedFlag.png" mode="widthFix" class="w-45 h-45"></image> -->
								<image 	:src="getImageUrl('/shopstatic/icon/certifiedFlag.png')" mode="widthFix" class="w-45 h-45"></image>
								<p class="fz22 font-bold text-white">{{ $t('未认证') }}</p>
							</view>
						</template>

						<view class="bg-white flex-start rounded-53 ml-10" style="max-width: 260rpx;display:inline-flex">
							<!-- <image src="../../../static/icon/iconBusiKind.png" mode="" class="w-30 h-30 mt-5 ml-10"></image> -->
							<image 	:src="getImageUrl('/shopstatic/icon/iconBusiKind.png')" mode="widthFix" class="w-45 h-45"></image>
							<!-- {{ userInfo.ide ntity_name }} -->
							<p style="color:#6E7EC5;font-size: 20rpx;margin-left:13rpx;line-height:35rpx;white-space: nowrap;" class="mr-20">{{ userInfo[plang('identity_name')] }}</p>
						</view>
					</view>
				</view>
			 </view> 
			<view v-else class="">
				<image :src="getImageUrl('/shopstatic/images/user/newUI/profilePicture.png')" mode="" class="w-110 h-110"></image>
			</view>
		 	<!-- <view class="CertifiedSty" v-if="userInfo&&userInfo.is_audit==2">
				<image src="../../../static/icon/certifiedFlag.png" mode="" class="w-45 h-45"></image>
		 		<p class="fz22 font-bold text-white">已认证</p>
		 	</view>
			<view class="CertifiedSty" v-else>
				<image src="../../../static/icon/certifiedFlag.png" mode="" class="w-45 h-45"></image>
				<p class="fz22 font-bold text-white">未认证</p>
			</view> -->
		 </view>
		 <!-- 会员权益 -->
		 <view class="memberBox ml-24 mr-24 " v-if="userInfo && false">
			 <!-- 会员展示 -->
			 <view class="" v-if="level == 0" @click="vip_route">
				<image :src="getImageUrl(`/shopstatic/img/${plang('nonMember')}.png`)" mode="" class="w-full h-300 memberImg"></image>
			 </view>
			 <view class="goldSty" v-if="level == 1" @click="vip_route">
				<image :src="getImageUrl(`/shopstatic/menmber/goldIcon.png`)" mode="" class="glodIconSty"></image>
				<view class="flex-start ml-30">
					<!-- <image src="../../../static/menmber/goldLv.png" mode="widthFix" class="h-35 w-90 mt-39"></image> -->
					<image :src="getImageUrl(`/shopstatic/menmber/vip (2).png`)" mode="widthFix" class="h-35 w-90 mt-39"></image>
					<p class="memberTextSty pt-40 ml-10">{{ $t('黄金会员') }}</p>
				</view>
				<p class="dateSty  ml-45 mt-8" v-if="lang == 'zh'">{{userInfo.vip_expire_at}} {{ $t('到期') }}</p>
				<p class="dateSty  ml-45 mt-8" v-else>{{ $t('到期') }} {{userInfo.vip_expire_at}} </p>
			 </view>
			 <view class="platinumSty" v-if="level == 2" @click="vip_route">
				<!-- <image src="../../../static/menmber/PlatinumIcon.png" mode="" class="glodIconSty"></image> -->
				<image  :src="getImageUrl(`/shopstatic/menmber/PlatinumIcon.png`)" mode="" class="glodIconSty"></image>
				<view class="flex-start ml-30">
					<image :src="getImageUrl(`/shopstatic/menmber/vip (3).png`)"  mode="widthFix" class="h-35 w-90 mt-39"></image>
					<!-- <image src="../../../static/menmber/PlatinumLv.png" mode="widthFix" class="h-35 w-90 mt-39"></image> -->
					<p class="memberTextSty pt-40 ml-10">{{ $t('铂金会员') }}</p>
				</view>
				<p class="dateSty  ml-45 mt-8" v-if="lang == 'zh'">{{userInfo.vip_expire_at}} {{ $t('到期') }}</p>
				<p class="dateSty  ml-45 mt-8" v-else>{{ $t('到期') }} {{userInfo.vip_expire_at}} </p>
			 </view>
			 <view class="diamondSty" v-if="level == 3" @click="vip_route">
				<image :src="getImageUrl(`/shopstatic/menmber/diamondIcon.png`)" mode="" class="glodIconSty"></image>
				<view class="flex-start ml-30">
					<!-- <image src="../../../static/menmber/diamondLv.png" mode="widthFix" class="h-35 w-90 mt-39"></image> -->
					<image :src="getImageUrl(`/shopstatic/menmber/vip (1).png`)" mode="widthFix" class="h-35 w-90 mt-39"></image>
					<p class="memberTextSty pt-40 ml-10">{{ $t('钻石会员') }}</p>
				</view>
				<p class="dateSty  ml-45 mt-8" v-if="lang == 'zh'">{{userInfo.vip_expire_at}} {{ $t('到期') }}</p>
				<p class="dateSty  ml-45 mt-8" v-else>{{ $t('到期') }} {{userInfo.vip_expire_at}} </p>
			 </view>
			 <!-- 积分操作 -->
			<template  v-if="lang == 'zh'">

				<view class="h-160 bg-white rounded-20 evenly memberInfo" v-if="vipPrivilegeGet('积分商城',true,true)">
					<view class="flex-start flex changeRedee" @click="redeePoint" v-if="vipPrivilegeGet('积分商城',true,true)">
						<image :src="getImageUrl(`/shopstatic/img/RedeemPoints.png`)" mode="" class="w-90 h-90 ml-20"></image>
						<view class="ml-5">
							<view class="flex-start center">
								<h3 class="fz30 font-bold text-333">{{ $t('积分商城') }}</h3>
								<image :src="getImageUrl(`/shopstatic/icon/shopArrow1.png`)" mode="" class="w-30 h-30 ml-10"></image>
							</view>
							<p style="font-size: 20rpx; color: #6083A2;">{{ $t('多种礼品等你兑换') }}</p>
						</view>
					</view>
					<view class="flex-start flex RechargeSty" @click="scorePoint">
						<image :src="getImageUrl(`/shopstatic/img/Recharge.png`)" mode=""class="w-90 h-90 ml-20"></image>
						<view class="ml-5">
							<view class="flex-start center">
								<h3 class="fz30 font-bold text-333">{{ $t('充值积分') }}</h3>
								<image :src="getImageUrl(`/shopstatic/icon/inArrow1.png`)" mode="" class="w-30 h-30 ml-10"></image>
							</view>
							
							<p style="font-size: 20rpx; color: #914F03;">{{ $t('积分余额') }} <span class="ml-10">{{ totalMoney }}</span> </p>
						</view>
					</view>
				</view>
				<view class="memberInfoxxxx " v-else>
				
					<view class="flex-start flex RechargeSty" @click="scorePoint">
						<image :src="getImageUrl(`/shopstatic/img/Recharge.png`)" mode=""class="w-90 h-90 ml-20 "></image>
						<view class="ml-10">
							<view class="flex-start">
								<h3 class="fz30 font-bold text-333">{{ $t('充值积分') }}</h3>
							</view>
							<p style="font-size: 20rpx; color: #914F03;">{{ $t('积分余额') }} <span class="ml-10">{{ totalMoney }}</span> </p>
						</view>
						<image :src="getImageUrl(`/shopstatic/icon/inArrow1.png`)" mode="" class="w-30 h-30 ml-10 imgru"></image>
					</view>
				</view>
			</template>



			<view class="memberInfoxxxx " v-else>
				<view class="flex-start flex changeRedee" @click="redeePoint" v-if="vipPrivilegeGet('积分商城',true,true)">
					<image :src="getImageUrl(`/shopstatic/img/RedeemPoints.png`)" mode="" class="w-90 h-90 ml-20"></image>
					<view class="ml-10">
						<view class="flex-start">
							<h3 class="fz30 font-bold text-333">{{ $t('积分商城') }}</h3>
						</view>
						<p style="font-size: 20rpx; color: #6083A2;">{{ $t('多种礼品等你兑换') }}</p>
					</view>
					<!-- <image src="../../../static/icon/shopArrow1.png" mode="" class="w-30 h-30 ml-10 imgru"></image> -->
					<image :src="getImageUrl(`/shopstatic/icon/shopArrow1.png`)" mode="" class="w-30 h-30 ml-10 imgru"></image>
				</view>
				<view class="flex-start flex RechargeSty" @click="scorePoint">
					<!-- <image src="../../../static/img/Recharge.png" mode=""class="w-90 h-90 ml-20 "></image> -->
					<image :src="getImageUrl(`/shopstatic/img/Recharge.png`)" mode=""class="w-90 h-90 ml-20 "></image>
					<view class="ml-10">
						<view class="flex-start">
							<h3 class="fz30 font-bold text-333">{{ $t('充值积分') }}</h3>
						</view>
						<p style="font-size: 20rpx; color: #914F03;">{{ $t('积分余额') }} <span class="ml-10">{{ totalMoney }}</span> </p>
					</view>
					<!-- <image src="../../../static/icon/inArrow1.png" mode="" class="w-30 h-30 ml-10 imgru"></image> -->
					<image :src="getImageUrl(`/shopstatic/icon/inArrow1.png`)" mode="" class="w-30 h-30 ml-10 imgru"></image>
				</view>
			</view>
		 </view>
		 <!-- 功能list -->
		 <view class="flex-start wrap bg-white mt-17 rounded-20 ml-24 mr-24 pb-40 pl-24 pr-24"
		 	style="box-shadow: 0px 4px 14.5px 0px #FFF inset;
			filter: drop-shadow(0px -1px 28.8px rgba(183, 222, 255, 0.58));
			backdrop-filter: blur(8.149999618530273px);"
			v-if="lang == 'ru'"
		 >
		 	<view  v-for="(item, index) in functionList" class=" mt-34 flex-col center relative xxxxxsx" @click="goPage(item.route, index)">
				<!-- <u-badge v-if="item.value" class="badgeBox" :value="item.value" :type="type"></u-badge> -->
		 		<image :src="item.src" mode="aspectFill" class="w-70 h-60"></image>
				<view class="fz22 text-555 mt-24" style="line-height: 30rpx;">{{item.text}}</view>
		 	</view>
		 </view>

		 	 <!-- 功能list -->
		<view class="flex-start wrap bg-white mt-30 rounded-20 ml-24 mr-24 pb-30" v-else>
		 	<view  v-for="(item, index) in functionList" class="h-160 w-170 mt-30 flex-col center relative" @click="goPage(item.route, index)">
				<!-- <u-badge v-if="item.value" class="badgeBox" :value="item.value" :type="type"></u-badge> -->
		 		<image :src="item.src" mode="aspectFill" class="w-70 h-60"></image>
				<p class="fz22 text-555 mt-24">{{item.text}}</p>
		 	</view>
		 </view>
		 
		 
		 <u-popup v-model="showCustomer" mode="bottom" length="25%" :closeable="true">
			 <view class="flex-col center">
			 	<view class="personSty" @click="personModal">
					{{ $t('人工客服') }}
				</view>
				<!-- <view class="onlineSty" @click="inlineTalk">
					{{ $t('在线客服') }}
				</view> -->
			 </view>
		</u-popup>
		<u-modal :confirm-text="$t('确定')"  :cancel-text ="$t('取消')"  v-model="showPersonInfo" width="70%" :show-title="false">
			<view class="flex wrap center mt-30 mb-30">
				<view class="phoneStxxxy" v-for="item in phoneList" @click="callPhone(item.tel +'')">
					{{item.country == 'zh'? $t('中国') : $t('俄罗斯')}} {{item.tel}}
				</view>
			</view>
		</u-modal>
	</view>
</template>

<script>
	import {
		IMAGE_URL,
		HTTP_IMG_UTL
	} from "@/config/app"
	import { getCustomerTel, getUserHomepage, getScoreTotal } from '@/api/basic'
import { createNational  } from '@/assets/public';
import { getPrivileges } from '@/api/basic.js'

	export default {
		data() {
			return {
				type:"warning",
				level: 0,
				showCustomer: false,
				showPersonInfo: false,
				IMAGE_URL: 'https://gluz-oss.oss-cn-beijing.aliyuncs.com/',
				phoneList: [],
				functionList: [ 
					{
						text: this.$t('我的发布'),
						route: '/pages/tabbar/newUser/myRelease/myReleaseList',
						src: this.getImageUrl('/shopstatic/icon/myicon1.png'),
						value: 15
					},
					{
						text: this.$t('我的邀请'),
						route: '/pages/tabbar/newUser/Invite/myInvite',
						// src: '/static/icon/myicon2.png',
						src: this.getImageUrl('/shopstatic/icon/myicon2.png'),
						
						value: 15
					}, 
					{
						text: this.$t('我的收藏'),
						route: '/pages/tabbar/newUser/myCollection/collectionList',
						// src: '/static/icon/myicon3.png'
						src: this.getImageUrl('/shopstatic/icon/myicon3.png')
					},
					{
						text: this.$t('服务订单'),
						route: '/pages/tabbar/newUser/serviceOrder/index',
						// src: '/static/icon/myicon4.png'
						src: this.getImageUrl('/shopstatic/icon/myicon4.png')
					},
					{
						text: this.$t('身份认证'),
						route: '',
						// src: '/static/icon/myicon5.png'
						src: this.getImageUrl('/shopstatic/icon/myicon5.png')
					},
					{
						text: this.$t('我的客服'),
						route: '',
						// src: '/static/icon/myicon6.png'
						src: this.getImageUrl('/shopstatic/icon/myicon6.png')
					}, 
					{
						text: this.$t('投诉建议'),
						route: '/pages/tabbar/newUser/Complain/complaintPage',
						// src: '/static/icon/myicon7.png'
						src: this.getImageUrl('/shopstatic/icon/myicon7.png')
					},
					{
						text: this.$t('积分账单'),
						route: '/pages/tabbar/newUser/pointsBill/index',
						// src: '/static/icon/myicon8.png'
						src: this.getImageUrl('/shopstatic/icon/myicon8.png')
					},
					{
						text: this.$t('视频教程'),
						route: '/pages/tabbar/newUser/videoCourse/index',
						// src: '/static/icon/videoIcon (3).png'
						src: this.getImageUrl('/shopstatic/icon/videoIcon (3).png')
					},
					{
						text: this.$t('赢取积分'),
						route: '/pages/tabbar/newUser/earningPoints/index',
						// src: '/static/icon/scoreIcon.png'
						src: this.getImageUrl('/shopstatic/icon/scoreIcon.png')
					},
					// {
					// 	text: this.$t('图片翻译'),
					// 	route: '',
					// 	src:lang =='zh'? this.getImageUrl('/shopstatic/icon/myicon9.png'):this.getImageUrl('/shopstatic/icon/myicon9_ru.png')
					// },
				],
				userStatus: null, //认证状态
				userInfoFull: {},
				token: "",
				off: false,
				totalMoney: 0,
				scoreoff: false,
				
				lang: '',
				currentLang: "",
				customer: '',
				userInfo: {
					label: [],
					country: {
						value: 0
					}
				},
				authShow: false,
				loading: false,
				isAuthName: -1,
				list: [],
				isShow: false,
				isIcon: false,
				usersId: uni.getStorageSync('user_id')
			}
		},
		created() {

		},
		onLoad() {
			this.lang = uni.getStorageSync("lang")
			// 刷新页面
			window.onNativeShow = this.getDataxxx

	
		},
		mounted() {
			
			this.token = uni.getStorageSync("xzdToken");
			this.userInfoFull = uni.getStorageSync("userInfoFull")
			this.loading = false
			this.getDataxxx();
			console.log('this.userInfoFull---', this.userInfoFull)
		},
		
		methods: {
			createNational,
			callPhone(tel) {
				this.isMessageGo({
					action: 'makePhoneCall',
					data: tel
				})
			},
			getDataxxx() {
				this.getUserInfo()
				this.getScoreTotal()
				this.getVipList()
			},
			getVipList(){
				if (uni.getStorageSync('user_id') != 0 && !!uni.getStorageSync('user_id')){
					getPrivileges({
						user_id: uni.getStorageSync('user_id'),
					}).then(res=>{
						let list = res.data.data?.data;
						let level = res.data.data?.level;
						uni.setStorageSync('vipList',list);
						uni.setStorageSync('level',level || 0);
						this.functionList = this.functionList.filter(item => {
							if(item.route == '/pages/tabbar/newUser/earningPoints/index'){
								return this.vipPrivilegeGet('积分奖励',true,true);
							}
							if(item.route == '/pages/tabbar/newUser/pointsBill/index'){
								return false; // 这块 true 是展示 false是不展示
							}
							return true;
						})
					})
				}
			},
			vip_route(){
				uni.navigateTo({
					url: '/pages/vip/index',
					webview: 'zWebView'
					// url: "/pages/zWebView/zWebView?url=" + encodeURIComponent(
					// 	`/pages/vip/index`)
				})
			},
			getScoreTotal() {
				getScoreTotal().then(res => {
					this.totalMoney = res.data.data.total
				})
			},
			scorePoint(){
				uni.navigateTo({
					url: '/pages/vip/scorePoint',
					webview: 'zWebView'
					// url: "/pages/zWebView/zWebView?url=" + encodeURIComponent(
					// 	`/pages/vip/scorePoint`)
				})
			},
			async goPage(route, index) {
				var vm = this
				if(uni.getStorageSync("userInfoFull")){
					if(index == 4){
						//货代认证
						if(this.userInfo.identity_type==5||this.userInfo.identity_type==6||this.userInfo.identity_type==7||this.userInfo.identity_type==2){
							var u_id = this.userInfo.user_id
							uni.navigateTo({
								url: `/pages/forwardingInformation/businessCardInput?u_id=`+u_id,
								webview: 'zWebView'
								// url: "/pages/zWebView/zWebView?url=" + encodeURIComponent(
								// 	`/pages/forwardingInformation/businessCardInput?u_id=`+u_id)
							})
						} else if (this.userInfo.identity_type==3 || this.userInfo.identity_type== 12) {
							// 采购商
							var identity_id = this.userInfo.identity_id
							var is_renzheng = this.userInfo.is_audit
							uni.navigateTo({
								url: `/pages/caigou/index?identity_id=${identity_id}&is_renzheng=${is_renzheng}&identity_type=${this.userInfo.identity_type}`,
								webview: 'zWebView'
							})
						} else if (this.userInfo.identity_type==0 || this.userInfo.identity_type==1) {
							// 供应商
							var identity_id = this.userInfo.identity_id
							var is_renzheng = this.userInfo.is_audit
							uni.navigateTo({
								url: `/pages/suppire/index?identity_id=${identity_id}&is_renzheng=${is_renzheng}`,
								webview: 'zWebView'
							})
						} else if (this.userInfo.identity_type== 4 || this.userInfo.identity_type==9) {
							// 服务商
							var identity_id = this.userInfo.identity_id
							var is_renzheng = this.userInfo.is_audit
							uni.navigateTo({
								url: `/pages/fuwu/index?identity_id=${identity_id}&is_renzheng=${is_renzheng}`,
								webview: 'zWebView'
							})
						} else if (this.userInfo.identity_type== 10 || this.userInfo.identity_type==11) {
							// 翻译
							var is_renzheng = this.userInfo.user_staff.is_renzheng
							console.log('is_renzheng--', is_renzheng)
							uni.navigateTo({
								url: `/pages/translate/authTranslate/index?is_renzheng=${is_renzheng}`,
								webview: 'zWebView'
							})
						} else  {
							uni.showToast({
								title: this.$t('此身份暂无功能'),
								icon: 'none'
							})
						}
						
					}else if (index == 5) {
						getCustomerTel().then(res => {
							this.phoneList = res.data.data
						})
						this.showCustomer = true
					 } 
					 //else if (  index == 9) {
					// 	// index == 8 ||
					// 	uni.$u.toast(this.$t('敬请期待'))
					// } 
					else {
						if (route == '/pages/tabbar/newUser/serviceOrder/index') {
							if (this.lang == 'zh') {
								await this.unAuthRedirect();
							}
							uni.navigateTo({
								url: route
							})
						} else {
							uni.navigateTo({
								url: route
							})
						}
					
					}
				}else{
					vm.$u.toast(app.$i18n.t('请先登录'));
					uni.clearStorage();
					uni.clearStorageSync();
					
					uni.setStorage({
						key: 'version',
						data: store.state.version
					})
					uni.setStorageSync('version', store.state.version)
					
					setTimeout(() => {
						// 此为uView的方法，详见路由相关文档
						vm.$u.route('/pages/user/login/login')
					}, 1000)
				}
			},
			// 复制文本到剪切板
			copyToClipboard(text) {
				console.log('text----', text)
			    uni.setClipboardData({
			        data: text,
			        success:  ()=> {
			            uni.showToast({
			                title: this.$t('复制成功'),
			                icon: 'success',
			                duration: 2000
			            });
			        },
			        fail:  ()=> {
			            uni.showToast({
			                title: this.$t('复制失败'),
			                icon: 'none',
			                duration: 2000
			            });
			        }
			    });
			},
			goInfoPage() {

				console.log('--==99999999999')
				// this.isMessageGo({
				// 	action: 'login'
				// })
				// return;
				uni.navigateTo({
					url: '/pages/tabbar/newUser/install/install'
				})
			},
			personModal() {
				this.showCustomer = false
				this.showPersonInfo = true
			},
			inlineTalk() {
				console.log('9999')
				this.isMessageGo({
					action: 'initiateChat',
					data: uni.getStorageSync('user_id')
				})

				
			},
			redeePoint() {
				uni.navigateTo({
					url: '/pages/tabbar/newUser/Mall/pointsMall'
				})
			},
			
			// 获取数据
			async getUserInfo() {
				// uni.showLoading({
				// 	title: this.$t('加载中')
				// });
			  let res = await getUserHomepage({
			    user_id: uni.getStorageSync('user_id')
			  });
			  let userinfo = res.data.data.userInfo;
			  uni.setStorageSync("userInfoFull", userinfo)
			
			  this.identity_type = userinfo.identity_type || '';
			  this.userInfo = userinfo
			  this.level = userinfo.level
			  this.loading = true
			  
				console.log('userInfo------', this.userInfo)
				
			},
	
		}
	}
</script>

<style lang="scss">
	@import '@/assets/appScss.scss';
	*{
		margin: 0;
		padding: 0;
	}
	page {
		background-color: #F6F7FB;
	}
	.phoneSty {
		width: 80%;
		height: 76rpx;
		font-family: PingFang SC;
		font-weight: 400;
		font-size: 30rpx;
		line-height: 76rpx;
		letter-spacing: 0px;
		border: 2rpx solid #E9E9E9;
		border-radius: 500rpx;
		margin-top: 24rpx;
		text-align: center;
	}
	.personSty {
		width: 90%;
		height: 94rpx;
		border: 2rpx solid #E9E9E9;
		font-family: PingFang SC;
		font-weight: 400;
		font-size: 32rpx;
		line-height: 94rpx;
		letter-spacing: 0%;
		border-radius: 500rpx;
		text-align: center;
		margin-top: 80rpx;
	}
	.onlineSty {
		width: 90%;
		height: 94rpx;
		background-color: #278AFF;
		font-family: PingFang SC;
		font-weight: 600;
		color: #fff;
		font-size: 32rpx;
		line-height: 94rpx;
		letter-spacing: 0%;
		border-radius: 500rpx;
		text-align: center;
		margin-top: 32rpx;
	}
	.bigBoxSty {
		// background-image: url(~@/static/images/user/newUI/bgIMg.png);
		background-image: url(https://gluz-oss.oss-cn-beijing.aliyuncs.com/shopstatic/images/user/newUI/bgIMg.png);
		
		background-size: 100% 40%;
		background-repeat: no-repeat;
	}
	.CertifiedSty {
		padding-right: 12rpx;
		height: 40rpx;
		background: linear-gradient(90deg, #FFBB00 0%, #FC7810 100%);
		display: flex;
		justify-content: flex-start;
		border-radius: 20rpx;
		line-height: 40rpx;
		image {
			margin-left: -10rpx;
			margin-top: 2rpx;
		}
	}
	.memberBox {
		position: relative;
		margin-top: 30rpx;
		.memberImg {
			position: relative;
			z-index: 3;
			margin-left: 7rpx;
		}
		.memberInfo {
			width: 100%;
			position: absolute;
			z-index: 10;
			margin-top: -150rpx;
			.changeRedee {
				width:47%; 
				background: linear-gradient(82.81deg, #F0F7FF 28.89%, rgba(255, 255, 255, 0.25) 98.97%);
				height: 126rpx;
			}
			.RechargeSty {
				width:47%;
				background: linear-gradient(82.81deg, #FFF8F0 28.89%, rgba(255, 255, 255, 0.25) 98.97%);
				height: 126rpx;
			}
		
		}
		.memberInfoxxxx {
			width: 100%;
			position: relative;
			z-index: 10;
			margin-top: -150rpx;
			.changeRedee {
				border: 16rpx solid #fff;
				background: linear-gradient(82.81deg, #F0F7FF 28.89%, rgba(255, 255, 255, 0.25) 98.97%);
				height: 158rpx;
				box-shadow: 0px 4px 14.5px 0px #FFF inset;
				filter: drop-shadow(0px -9px 11px rgba(140, 155, 170, 0.19));
				backdrop-filter: blur(8.149999618530273px);
				border-radius: 20rpx;
				overflow: hidden;
				margin-bottom: 16rpx;
				position: relative;
				.imgru {
					position: absolute;
					right: 24rpx;
					top: 50%;	
					transform: translateY(-50%);
				}
			}
			.RechargeSty {
				border: 16rpx solid #fff;
				background: linear-gradient(82.81deg, #FFF8F0 28.89%, rgba(255, 255, 255, 0.25) 98.97%);
				height: 158rpx;
				box-shadow: 0px 4px 14.5px 0px #FFF inset;
				filter: drop-shadow(0px -9px 11px rgba(140, 155, 170, 0.19));
				backdrop-filter: blur(8.149999618530273px);
				border-radius: 20rpx;
				overflow: hidden;
				position: relative;
				.imgru {
					position: absolute;
					right: 24rpx;
					top: 50%;	
					transform: translateY(-50%);
				}
			}
		}
		.goldSty {
			background-image: url(https://gluz-oss.oss-cn-beijing.aliyuncs.com/shopstatic/menmber/goldBg.png);
			background-size: 100% 100%;
			width:100%;
			height:300rpx;
			position: relative;
			.glodIconSty {
				width: 200rpx;
				height: 200rpx;
				position: absolute;
				right: 24rpx;
				top: -30rpx;
			}
			.dateSty {
				color: #904538;
				font-size: 20rpx;
			}
			.memberTextSty {
				color: #904538;
				font-size: 38rpx;
				font-weight: 600;
			}
		}
		.platinumSty {
			background-image: url(https://gluz-oss.oss-cn-beijing.aliyuncs.com/shopstatic/menmber/PlatinumBg.png);
			background-size: 100% 100%;
			width:100%;
			height:300rpx;
			position: relative;
			.glodIconSty {
				width: 140rpx;
				height: 140rpx;
				position: absolute;
				right: 24rpx;
				top: -30rpx;
			}
			.dateSty {
				color: #fff;
				font-size: 20rpx;
			}
			.memberTextSty {
				color: #fff;
				font-size: 38rpx;
				font-weight: 600;
			}
		}
		.diamondSty {
			// background-image: url(https://gluz-oss.oss-cn-beijing.aliyuncs.com/shopstatic/diamondBg.png);
			background-image: url(https://gluz-oss.oss-cn-beijing.aliyuncs.com/shopstatic/menmber/diamondBg.png);
			background-size: 100% 100%;
			width:100%;
			height:300rpx;
			position: relative;
			.glodIconSty {
				width: 140rpx;
				height: 140rpx;
				position: absolute;
				right: 24rpx;
				top: -30rpx;
			}
			.dateSty {
				color: #fff;
				font-size: 20rpx;
			}
			.memberTextSty {
				color: #fff;
				font-size: 38rpx;
				font-weight: 600;
			}
		}
	}
	.badgeBox {
		width: 48rpx; 
		height: 22rpx;
		background: linear-gradient(96.98deg, #FC5E37 6.1%, #FF3200 99.27%);
		color: #fff;
		margin-left: 15rpx;
		margin-bottom: -10rpx;
		border-radius: 500rpx 0 0 0;
		right: 40rpx !important;
	}
	.xxxxxsx {
		align-items: center;
		justify-content: center;
		width: 25%;
		.fz22 {
			text-align: center !important;
		}
	}
	.phoneStxxxy{
		margin-bottom: 20rpx;
	}
</style>
